﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using EF_CodeFirstForSqlite.Models.Mapping;

namespace EF_CodeFirstForSqlite.Models
{
    public class SchoolContext:DbContext
    {
        public SchoolContext()
            : base("Name=SchoolContext")
        {

        }

        public DbSet<Student> Students { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Configurations.Add(new StudentMap());
        }
    }
}